<#-- Copyright 2010 Canadensys -->
<#include "_inc/ftl/common.ftl">

<#if search.term?has_content>
	<@assignTitle str=locale.namesearch_title2 args=[search.term]/>
<#else>
	<@assignTitle str=locale.namesearch_title1/>
</#if>
<#assign currentPage="search"/>

<#include "_inc/ftl/header.ftl">
<script type="text/javascript" src="http://data.canadensys.net/common/js/sorttable.js"></script>
<script type="text/javascript" src="js/fulltext.js"></script>
<#include "_inc/ftl/menu.ftl">

<h1><@display str=locale.namesearch_title1/></h1>		 
<form id="search_box" class="round custom_form" method="get" onkeypress="return event.keyCode != 13;">
	<p><input type="text" name="q" id="search_term" value="${search.term}" autocomplete="off"/> <input type="button" onclick="document.forms[0].submit()" value="<@display str=locale.namesearch_button1/>"/></p>
	<div class="dropdown_container">
		<ul id="search_dropdown" class="dropdown custom_list">
		</ul>
	</div>
	<#if language == "fr">
		<input type="hidden" name="lang" id="search_lang" class="" value="fr" autocomplete="off"/>
	</#if>
	<p><@display str=locale.namesearch_msg1/></p>
</form>

<#if search.term?has_content >
<h2><@display str=locale.namesearch_h2_results args=[search.total]/></h2>
<table class="sortable custom_results_table" id="search_results">
<thead>	
	<tr>
		<th><@display str=locale.namesearch_th1/></th>
		<th><@display str=locale.namesearch_th2/></th>
		<th><@display str=locale.namesearch_th3/></th>
	</tr>
</thead>
<tbody>
<#list results as result>
	<tr>
		<td class="${result.fullScientificNameStatus}"><a href="taxon/${result.taxonId}<@display str=locale.url_language/>">${result.fullScientificNameHtml}</a></td>
		<td class="${result.frenchVernacularNameStatus}">${result.frenchVernacularNameHtml}</td>
		<td class="${result.englishVernacularNameStatus}">${result.englishVernacularNameHtml}</td>
	</tr>
</#list>
</tbody>
 </table>
 <#else>
 <p><img src="images/accepted_species_per_genus.png" width="100%" alt="Word cloud image" title="<@display str=locale.img1_title/>"/></p>
 </#if>

<#include "_inc/ftl/footer.ftl">